package com.zb.scheduletask.tasks;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zb.scheduletask.ScheduledTask;
import com.zb.tcp.socket.LongConnectionSendMsgImpl;

@Component
public class ConnectionPoolReconnectTask implements ScheduledTask
{
	private Log log = LogFactory.getLog(ConnectionPoolReconnectTask.class);

	@Autowired
	LongConnectionSendMsgImpl longConnectionSendMsg;

	@Override
	public void execute()
	{
		if (longConnectionSendMsg.needReconnect())
			longConnectionSendMsg.reConnect();

	}
}
